Articles by Authorised Territory

Add SQL Server database with seed data to .NET Aspire during app startup

Authorised Territory code examples - This .NET Aspire #tutorial shows how to add SQL Server database in App host project as resource and display it in the dashboard. In addition #sql script is executed after the sql server instance is available in the docker container.

How to add Angular project to .NET Aspire

This .NET Aspire #tutorial shows how to integrate Angular project with #dotnet Aspire. First, we add new #angular project using Visual Studio template. New TypeScript model and service are created. The service calls an endpoint in the WebAPI project to obtain the data. Next, nuget package for Node integration is installed in the AppHost project and Angular project is integrated with .NET Aspire in Program.cs file. Finally, the Angular website and the WebAPI are tested via the dashboard.

How to persist data for a SQL Server resource in .NET Aspire

This #dotnet #tutorial shows how to persist data for a SQL Server resource in .NET Aspire app host project. We start with a solution from a previous video • .NET Aspire SqlServer Entity Framewor... and configure a volume for a #sql Server resource using WithBindMount. Next, a database is created using SQL Server Configuration Manager and a script to add test tables is ran. Finally, we show that the database has not been lost between AppHost project runs.

How to add .NET Aspire to existing an project

First, using an existing Blazor project, we add .NET Aspire Service Defaults project. The website is ran to show logging and health-check endpoint. Next, .NET Aspire App Host project is added and set as a start up project. Finally, the website is run again and the dashboard available in the AppHost project is displayed.